// 政策支持
export const PolicySupportThead = [
  {
    type: 'selection',
    width: 60,
    align: 'center'
  },
  {
    title: '文件名称',
    key: 'fileName',
    render: (h, params) => {
      const text = params.row.fileName
      return h('div', {
        style: {
          cursor: params.row.type === 2 ? 'pointer' : 'default',
          color: params.row.type === 2 ? '#188cc7' : ''
        },
        on: {
          click: () => {
            params.row.type === 2 ? this.handleFolder(params.index, params) : ''
          }
        }
      }, [
        h('Icon', {
          props: {
            type: params.row.type === 2 ? 'ios-folder-open' : ''
          },
          style: {
            color: '#ffb340',
            marginRight: '5px',
            fontSize: '24px'
          }
        }),
        h('span', text)
      ])
    }
  },
  {
    title: '文件大小',
    key: 'fileSize'
  },
  {
    title: '上传时间',
    key: 'createrTime',
    render: (h, params) => {
      // const text = (params.row.createrTime).slice(0, 10)
      const text = params.row.createrTime ? params.row.createrTime.substr(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '文件类型',
    key: 'fileType',
    render: (h, params) => {
      const text = params.row.fileType === 1 ? '公共文件' : '个人文件'
      return h('span', text)
    }
  },
  {
    title: '创建人',
    key: 'createrName'
  },
  {
    title: '操作',
    key: 'action',
    slot: 'action'
  }
]
